package com.tentact.servlets;

import com.tentact.service.MeetingService;
import com.tentact.vo.Meeting;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;

@WebServlet(name = "SelectByNameMeetingSevenServlet", value = "/SelectByNameMeetingSevenServlet")
public class SelectByNameMeetingSevenServlet extends HttpServlet {
    MeetingService service = new MeetingService();

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HttpSession session=request.getSession();
        int employeeid=(int)session.getAttribute("employeeid");

        List<Meeting> meetings = service.SelelctByNameMeetingSeven(employeeid);

        request.setAttribute("meetings", meetings);
        request.getRequestDispatcher("mybookings.jsp").forward(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
